-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jollyday Pojos using only regular plain old java objects for configuration #451
base: main
Are you sure you want to change the base?
Conversation
Hey @gandulf, Some thoughts are:
|
Hey,
I'll look into the code generation stuff as soon as there is some spare time... |
I replaced the manual code generation with a proper maven plugin generator that creates the necessary holiday config files during/before compilation automatically and puts them into /target/generated_sources that way they no longer need to be versioned by git and are always uptodate with the xml files. I also added a test case that adds an additional holiday to the existing ones in the PojoConfigurationService to prove that it is still possible to add,replace holiday configuration if necessary. It's not as convenient as with the xml files but still possible. |
926aecb
to
92d094e
Compare
I wanted to take a deeper look.
|
…rate source phase with separate plugin
…rate source phase with separate plugin
…ith plain unicode characters
…ed since pojo-generator reads xml files. add unittest for customization of java configuration via code
…e, since java is to general.
Hi,
I plan to use jollydays in a quarkus graalvm microservice projects where i try to keep additional dependencies especially regarding jackson/jaxb etc, to a minimum.
Therefore I made a jollyday implementation that only uses plain old java objects for configuration.
I know that this means that a change/reconfiguration of the holiday data is no longer possible but in the past years I've been using it I never needed that flexibility since the holiday definitions are rather global and consistent.
Disclaimer:
At the moment the POJOs are generated based on the xml files inside a pseudo test class "JavaGeneratorTest" that takes the JacksonConfiguration Classes and creates the POJOs SourceCode using ugly String Writer logic.
Not my proudest part of java code, but it works is only needed in case the configuration changes and needs to be recreated.